package com.notetool.threadwork;

import com.notetool.datafetching.ComposedQueryNode;
import com.notetool.datafetching.Query;
import com.notetool.datafetching.QueryNode;
import com.notetool.model.NoteSet;
import com.notetool.util.tokenparser.TokenList;


public class QueryManager
{
    
    ////////////////////
    // Public methods
    public NoteSet runQuery ()
    {
        
    }
    
    public void runAsyncQuery ()
    {
        
    }
    //return new Query.buildFrom (tokens, this);
    // buildFrom creates the node, throws QueryInit and MonitorStopped
    // instanciate Query and passes built node as param
    
    // Replace the inheritance crap with actual IParserMonitor and IQueryMonitor
    // It means we dont need this class anymore...
    // We'll just need the QueryManager class
    // It'll implement parserCheckpoint and queryCheckpoint which will respectively throw ParserStoppedEx and QueryStoppedEx
    // We'll just have a runQuery(String) method which will call the parser (with self as ParserMonitor argument), then Query.buildFrom (with self as QueryMonitor argument), then query.run (with self as QueryMonitor argument).
    // In the checkpoints, if the thread id == event thread, instantly return, never throw exception...
    // We also have a runAsyncQuey (String) which builds an QueryThread (passing it the string), which in turn calls QueryManager.runQuery ();

}
